package com.cmc.cloud.cmclink.doc.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.hibernate.validator.constraints.Length;

import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*;

/**
 * 基础数据配置信息 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author codegen
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseCodeBaseVO {

    @Schema(description = "代码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{BaseCodeBaseVO.code.notblank}")
    @Length(max = 50, message = "代码支持最大长度{max}")
    private String code;

    @Schema(description = "代码类型", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{BaseCodeBaseVO.codeCategory.notblank}")
    @Length(max = 20, message = "代码类型支持最大长度{max}")
    private String codeCategory;

    @Schema(description = "中文名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{BaseCodeBaseVO.descCn.notblank}")
    @Length(max = 200, message = "中文名称支持最大长度{max}")
    private String descCn;

    @Schema(description = "英文名称")
    @Length(max = 200, message = "英文名称支持最大长度{max}")
    private String descEn;

    @Schema(description = "网厅显示")
    private Boolean ebShow;

    @Schema(description = "港口")
    @Length(max = 5, message = "港口支持最大长度{max}")
    private String portCode;

    @Schema(description = "排序号")
    @Pattern(regexp = "^\\d{1,5}$", message = "必须由1到5位阿拉伯数字组成")
    private String sortNo;

    @Schema(description = "是否启用")
    private Boolean enable;

    @Schema(description = "备注", example = "你说的对")
    @Length(max = 50, message = "备注支持最大长度{max}")
    private String remark;

}
